<?
/**
 * Copyright 2008 Melange.
 *
 * This file is part of Melange CMS
 *
 * @package cms
 *
 */


/**
 * Requirements
 */
require_once("mvc/action/ActionForm.php");
require_once("mvc/action/ActionMessage.php");
require_once("mvc/action/ActionMessages.php");



/**
 * BaseAbstractListForm Class
 *
 * @category    Melange CMS
 * @package     cms
 * @copyright   Copyright (c) 2007 Jeroen Simons. All rights reserved
 * @author      Jeroen Simons <jeroen@melange.nl>
 * @link        http://www.melange.nl/
 */
class BaseAbstractListForm extends ActionForm {


    // ----------------------------------------------------- Instance Variables


    /**
     * order
     *
     * @var mixed 
     */
    protected $order;


    /**
     * direction
     *
     * @var mixed 
     */
    protected $direction;


    /**
     * items
     *
     * @var mixed 
     */
    protected $items;


    /**
     * action
     *
     * @var mixed 
     */
    protected $action;


    /**
     * page
     *
     * @var mixed 
     */
    protected $page;


    /**
     * results
     *
     * @var mixed 
     */
    protected $results;


    /**
     * query
     *
     * @var mixed 
     */
    protected $query;


    /**
     * filter
     *
     * @var mixed 
     */
    protected $filter;


    /**
     * id
     *
     * @var mixed 
     */
    protected $id;


    /**
     * language
     *
     * @var mixed 
     */
    protected $language;


    /**
     * parameter
     *
     * @var mixed 
     */
    protected $parameter;


    // ----------------------------------------------------------- Constructors


    /**
     * Construct new BaseAbstractListForm
     */
    public function __construct() {
        $this->order = null;
        $this->direction = null;
        $this->items = array();
        $this->action = null;
        $this->page = 1;
        $this->results = 20;
        $this->query = null;
        $this->filter = null;
        $this->id = null;
        $this->language = null;
        $this->parameter = null;
    }


    // ------------------------------------------------------------- Properties


    /**
     * Get Order
     *
     * @return mixed 
     */
    public function getOrder() {
        return $this->order;
    }


    /**
     * Set Order
     *
     * @param mixed  order
     */
    public function setOrder($order) {
        $this->order = $order;
    }


    /**
     * Get Direction
     *
     * @return mixed 
     */
    public function getDirection() {
        return $this->direction;
    }


    /**
     * Set Direction
     *
     * @param mixed  direction
     */
    public function setDirection($direction) {
        $this->direction = $direction;
    }


    /**
     * Get Items
     *
     * @return mixed 
     */
    public function getItems() {
        return $this->items;
    }


    /**
     * Set Items
     *
     * @param mixed  items
     */
    public function setItems($items) {
        $this->items = $items;
    }


    /**
     * Get Action
     *
     * @return mixed 
     */
    public function getAction() {
        return $this->action;
    }


    /**
     * Set Action
     *
     * @param mixed  action
     */
    public function setAction($action) {
        $this->action = $action;
    }


    /**
     * Get Page
     *
     * @return mixed 
     */
    public function getPage() {
        return $this->page;
    }


    /**
     * Set Page
     *
     * @param mixed  page
     */
    public function setPage($page) {
        $this->page = $page;
    }


    /**
     * Get Results
     *
     * @return mixed 
     */
    public function getResults() {
        return $this->results;
    }


    /**
     * Set Results
     *
     * @param mixed  results
     */
    public function setResults($results) {
        $this->results = $results;
    }


    /**
     * Get Query
     *
     * @return mixed 
     */
    public function getQuery() {
        return $this->query;
    }


    /**
     * Set Query
     *
     * @param mixed  query
     */
    public function setQuery($query) {
        $this->query = $query;
    }


    /**
     * Get Filter
     *
     * @return mixed 
     */
    public function getFilter() {
        return $this->filter;
    }


    /**
     * Set Filter
     *
     * @param mixed  filter
     */
    public function setFilter($filter) {
        $this->filter = $filter;
    }


    /**
     * Get Id
     *
     * @return mixed 
     */
    public function getId() {
        return $this->id;
    }


    /**
     * Set Id
     *
     * @param mixed  id
     */
    public function setId($id) {
        $this->id = $id;
    }


    /**
     * Get Language
     *
     * @return mixed 
     */
    public function getLanguage() {
        return $this->language;
    }


    /**
     * Set Language
     *
     * @param mixed  language
     */
    public function setLanguage($language) {
        $this->language = $language;
    }


    /**
     * Get Parameter
     *
     * @return mixed 
     */
    public function getParameter() {
        return $this->parameter;
    }


    /**
     * Set Parameter
     *
     * @param mixed  parameter
     */
    public function setParameter($parameter) {
        $this->parameter = $parameter;
    }


    // --------------------------------------------------------- Public Methods


    /**
     * Validate this form
     *
     * @return array $errors
     */
    public function validate() {

        $errors = new ActionMessages();

        return $errors;
    }

}
?>